Skip to content

cmd/utils: don't crash on nonexistent datadir#22738

Merged
karalabe merged 1 commit into
ethereum:masterfrom
MariusVanDerWijden:datadir-crash
May 3, 2021
Merged

cmd/utils: don't crash on nonexistent datadir#22738
karalabe merged 1 commit into
ethereum:masterfrom
MariusVanDerWijden:datadir-crash

Conversation

@MariusVanDerWijden
Copy link
Copy Markdown
Member

closes #22720

Problem is that if the datadir is opened read only and does not exist, the leveldb.New command will fail.
Previous behavior was to create the datadir if non-existent.
This PR restores previous behavior

Copy link
Copy Markdown
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should figure out a better way to handle it. But the temporary fix is also good to me.

@karalabe karalabe added this to the 1.10.3 milestone May 3, 2021
@karalabe karalabe merged commit 8f94fc2 into ethereum:master May 3, 2021
atif-konasl pushed a commit to frozeman/pandora-execution-engine that referenced this pull request Oct 15, 2021
@MariusVanDerWijden MariusVanDerWijden deleted the datadir-crash branch November 30, 2021 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using geth with the flags --dev and --datadir leads to an error since v1.10.2

3 participants